combobox: popdown() the menu during unmap()
authorDaniel Boles <dboles@src.gnome.org>
Fri, 20 Jan 2017 03:30:36 +0000 (03:30 +0000)
committerDaniel Boles <dboles@src.gnome.org>
Fri, 20 Jan 2017 13:47:26 +0000 (13:47 +0000)
commit360fbd0920a8b45203929d782ee10f0b60998cb0
tree97383d83dc623733e50c8a68138f46b95a9b9714
parentf686dfb575e1279721d11aaab1a98a9335f0dced
combobox: popdown() the menu during unmap()

combo_box_popdown() currently skips popping down our menu if it is NULL.
But the required call to this at end-of-life was in destroy(), by which
point dispose() already NULLed the menu, so Menu::popdown() would never
run, even if it should. Fix this by trying popdown() earlier in unmap().
Also, add a converse assurance that we don’t popup() while not mapped.

Even once we remove all the now-pointless NULL checks, destroy() was the
wrong place to call combo_box_popdown(), and unmap() is the right place.
gtk/gtkcombobox.c